function decoratePage(a) {
	//a对象参数形式
	//	{
	//		pageNow:1,当前页面
	//		pageSize:10,每页显示的条数
	//		startPage:0,数据库查询开始位置
	//		totalCount:3,查询数据条数
	//		totalPageCount:1  一共有多少页
	//	}
	var now = a.pageNow;
	var total = a.totalPageCount;

	//分页html样式
	var htmlLeft = "<li><a href='javascript:void(0);' onclick='turnTo(this)'>"
	var htmlChoose = "<li class='active'><a href='javascript:void(0);' onclick='turnTo(this)'>"
	var htmlRight = "</a></li>";

	//具体实现业务逻辑
	var innerHtml = "<li><a href='javascript:void(0);' onclick = turnToPrev(" + now+","+
		total + ");>Prev</a></li>";
	if(total <= 8) {
		for(let i = 1; i <= total; i++) {
			if(now == i) {
				innerHtml += htmlChoose + i + htmlRight
			} else {
				innerHtml += htmlLeft + i + htmlRight
			}
		}
	} else if(8 < total && total <= 13) {
		if(now <= 7) {
			for(let i = 1; i <= 7; i++) {
				if(now == i) {
					innerHtml += htmlChoose + i + htmlRight
				} else {
					innerHtml += htmlLeft + i + htmlRight
				}
				innerHtml += "<li><a href='javascript:void(0);'>...</a></li>";
				var zz = total - 7;
				if(zz > 3) {
					for(let i = 2; i >= 0; i--) {	
						innerHtml += htmlLeft + (total - i) + htmlRight
					}
				} else {
					innerHtml += htmlLeft + total + htmlRight
				}
			}
		} else {
			for(let i = 0; i <= 7; i++) {
				if(now == i) {
					innerHtml += htmlChoose + (total - i) + htmlRight
				} else {
					innerHtml += htmlLeft + i + htmlRight
				}
				innerHtml += "<li><a href='javascript:void(0);'>...</a></li>";
				var zz = total - 7;
				if(zz > 3) {
					for(let i = 1; i <= 3; i++) {
						innerHtml += htmlLeft + i + htmlRight
					}
				} else {
					innerHtml += htmlLeft + 1 + htmlRight
				}
			}
		}
	}
	else {
		if(now < 7) {
			for(let i = 1; i <= 7; i++) {
				if(now == i) {
					innerHtml += htmlChoose + i + htmlRight
				} else {
					innerHtml += htmlLeft + i + htmlRight
				}
			}
			innerHtml += "<li><a href='javascript:void(0);'>...</a></li>";
			for(let i = 2; i >= 0; i--) {
				innerHtml += htmlLeft + (total - i) + htmlRight
			}
		} else if(now > (total - 7)) {
			for(let i = 1; i <= 3; i++) {
				innerHtml += htmlLeft + i + htmlRight
			}
			innerHtml += "<li><a href='javascript:void(0);'>...</a></li>";
			for(let i = 7; i >=0; i--) {
				if(now == (total - i)) {
					innerHtml += htmlChoose + (total - i) + htmlRight
				} else {
					innerHtml += htmlLeft + (total - i) + htmlRight
				}
			}
		} else {
			for(let i = 1; i <= 3; i++) {
				innerHtml += htmlLeft + i + htmlRight
			}
			innerHtml += "<li><a href='javascript:void(0);'>...</a></li>";
			for(let i = 5; i >= 1; i--) {
				if(i == 3) {
					innerHtml += htmlChoose + now + htmlRight
				} else {
					innerHtml += htmlLeft + (parseInt(now) + 3 - i) + htmlRight
				}
			}
			innerHtml += "<li><a href='javascript:void(0);'>...</a></li>";
			for(let i = 2; i >= 0; i--) {
				innerHtml += htmlLeft + (total - i) + htmlRight
			}
		}
	}
	 innerHtml += "<li><a href='javascript:void(0);' onclick = turnToNext(" + now+","+
		total + ");>Next</a></li>";
	return innerHtml;
}